﻿// project created on 27.07.2007 at 12:47
using System;
using System.IO;
using System.Drawing;
using System.Threading;
using System.Resources;
using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Reflection;

namespace Gamadus.Engine
{
	public enum Setting
	{
		AllowCloseButton,
		AllowF4,
		AllowESC,
		StartFullScreen
	}
	
	public class Engine : SingletonManager<Engine>
	{
		public Dictionary<Setting, object> GameSettings = new Dictionary<Setting, object>();
		public Random random = new Random();
        
        /// <summary>
        /// Runs the engine by initializing managers for resources and window,
        /// going to the first room and starting the game loop
        /// </summary>
		public void Init()
        {
	    	InputMgr.Instance.Init();
	    	ResourceMgr.Instance.Init();
	    	WindowMgr.Instance.Init();
	    	DrawMgr.Instance.Init();
		}
		
		public void Run()
		{
	    	RoomMgr.Instance.GoToFirst();
			WindowMgr.Instance.Run();
		}
	}
}